Method and apparatus for controlling stream to receive data in parallel

ABSTRACT

Provided are a method and an apparatus for controlling streams to receive data in parallel. The method includes receiving data in parallel using a plurality of connected streams, calculating a network congestion rate using a change in a transmission speed of data received through each of the plurality of streams, adjusting a number of connections of the plurality of streams based on the calculated network congestion rate, and receiving the data in parallel using the adjusted number of streams.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application claims priority from Republic of Korea PatentApplication No. 10-2011-0052405 filed on May 31, 2011 in theIntellectual Property Office of the Republic of Korea, the disclosure ofwhich is incorporated herein by reference in its entirety.

BACKGROUND

1. Field

Apparatuses and methods consistent with the exemplary embodimentsinclude a method and an apparatus for controlling streams to receivedata in parallel, and, more particularly, to a method and an apparatusfor controlling streams to receive data in parallel, which can controlthe number of connections of parallel streams based on a networkcongestion rate and a threshold value.

2. Description of the Related Art

With the rapid spread of the use of highly efficient mobile devices hascome a phenomenon of reduced transmission speeds for large files. Thisis because the demands of mobile devices are accommodated within alimited network bandwidth, and also because many mobile devices sharethat limited network bandwidth. As a result, network response times tendto deteriorate, especially for large file transmissions. One frequentlyattempted solution has been to upgrade the hardware so as to be able tosend and receive data faster. This approach has been helpful, butexpensive.

Other solutions focus on the manner in which the data is sent. One filetransmission method is to transmit files using only a singletransmission control protocol (TCP) stream. In this method, a single TCPstream is set up between a server and a client, in a cloud-based system.Then, data is transmitted through a single channel. However, since sucha related-art file transmission method transmits data through a singlechannel, the transmission efficiency abruptly decreases when the networkpacket loss rate is high, or when the round trip time (RTT) for thechannel is long.

Another approach arose in response to the problems just mentioned. Inparticular, another related-art file transmission method is to useparallel streams. In this related-art parallel stream approach, however,the number of connections of parallel streams is calculated depending onthe packet loss rate and on the RTT. This results in the need to employa complicated algorithm to calculate how many connections of parallelstreams should be used. Unfortunately, a system call has to be made todetermine the packet loss rate and the RTT. Since the result of thealgorithm depends on the packet loss rate and the RTT, and since thesetwo inputs require a system call, porting the algorithm to differentsystems requires a modification to the operating system (OS) kernel.Kernel modifications are certainly possible, but this point makes themore widespread development of such a system difficult.

SUMMARY

One or more aspects of the exemplary embodiments provide a method and anapparatus for controlling streams to receive data in parallel, which canadaptively adjust the number of connections of streams according to anetwork situation, while transmitting data using parallel streams, andexchanging data at an improved speed.

One or more aspects of the exemplary embodiments also provide a methodand an apparatus for controlling streams to receive data in parallel,which can adjust the number of connections of streams withoutcalculating packet loss or an RTT separately.

According to an aspect of an exemplary embodiment, there is provided amethod for controlling streams to receive data in parallel, the methodincluding: receiving data in parallel using a plurality of connectedstreams, calculating a network congestion rate using a change in atransmission speed of data received through each of the plurality ofstreams, adjusting a number of connections of the plurality of streamsbased on the calculated network congestion rate, and receiving the datain parallel using the adjusted number of streams

According to an aspect of another exemplary embodiment, there isprovided an apparatus for parallel reception of data, the apparatusincluding: a communication unit which receives data in parallel using aplurality of streams, and a parallel connection management unit whichcalculates a network congestion rate using a change in a transmissionspeed of data received in parallel through each of the plurality ofstreams, and adjusts a number of connections of the plurality of streamsbased on the calculated network congestion rate, wherein thecommunication unit receives the data in parallel using the streams thenumber of which is adjusted by the parallel connection management unit.

According to another exemplary embodiment, there is provided anapparatus that receives data, the apparatus including: a communicationunit, connection management unit, and a memory; wherein: thecommunication unit receives data, in parallel streams, at a presentnumber of a plurality of connections, and stores the received data atleast temporarily in the memory; the connection management unitdynamically calculates a network congestion rate based on a presentnumber of the plurality of connections; the connection management unituses the calculated network congestion rate to make a determination asto whether to adjust the present number of the plurality of connections;and when the determination to adjust is an affirmative determination,the communication unit issues a change notification indicating a newnumber of the plurality of connections to be used thereafter.

According to an exemplary embodiment, the network congestion rate can becalculated more easily using a double moving average algorithm withoutusing a packet loss rate and an RTT which are obtained depending on asystem call.

Also, according to an exemplary embodiment, since the number of streamconnections is increased or reduced according to a result of comparingthe network congestion rate and at least one threshold value, the numberof stream connections can be adaptively adjusted according to a networksituation.

Also, according to an exemplary embodiment, the number of streams is setin consideration of a current network situation without affecting thenetwork situation, so that data can be transmitted in parallel at ahighest speed.

Also, according to an exemplary embodiment, since the number of streamconnections is controlled based on the transmission speed of the datareceived using the plurality of streams, it is not necessary to change akernel of an OS due to a logic process based on an application layer ofa network, or a system call such as an RTT or a packet loss rate is notrequired. Accordingly, high speed parallel transmission of data can beachieved regardless of a type of an OS simply by installing simplesoftware in a server or a device which is to transmit data at a highspeed and a server or a device which is to receive data.

Additional aspects and advantages of the exemplary embodiments will beset forth in the detailed description, will be obvious from the detaileddescription, or may be learned by practicing the exemplary embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other features and advantages will become more apparent bydescribing in detail exemplary embodiments with reference to theattached drawings in which:

FIG. 1 is a view illustrating a transmitting and receiving system forparallel transmission of data according to an exemplary embodiment;

FIG. 2 is a block diagram illustrating a first data transmittingapparatus and a first data receiving apparatus for parallel transmissionof data according to an exemplary embodiment;

FIG. 3 is a view to explain an example of a unit window;

FIG. 4A is a view to explain an example of a method of calculating anetwork congestion rate using a double moving average algorithmaccording to an exemplary embodiment;

FIG. 4B is a view illustrating first to third unit windows of FIG. 4A;

FIG. 5 is a block diagram illustrating a second data transmittingapparatus and a second data receiving apparatus for paralleltransmission of data according to another exemplary embodiment;

FIG. 6 is a view illustrating a configuration of a file block accordingto an exemplary embodiment;

FIG. 7 is a flowchart to explain a method for controlling streams toreceive data in parallel according to an exemplary embodiment;

FIG. 8 is a flowchart to explain a method for calculating the number ofstream connections described in operation S770 of FIG. 7; and

FIG. 9 is a flowchart to explain a method for controlling streams toreceive data in parallel according to another exemplary embodiment.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Exemplary embodiments will now be described more fully with reference tothe accompanying drawings to clarify aspects, features and advantages ofthe inventive concept. The exemplary embodiments may, however, beembodied in many different forms and should not be construed as limitedto the exemplary embodiments set forth herein. Rather, the exemplaryembodiments are provided so that this disclosure will be thorough andcomplete, and will fully convey the scope of the application to those ofordinary skill in the art. It will be understood that when an element,layer or region is referred to as being “on” another element, layer orregion, the element, layer or region can be directly on another element,layer or region or there may be intervening elements, layers or regions.

The terms used herein are for the purpose of describing particularexemplary embodiments only and are not intended to be limiting. As usedherein, the singular forms “a”, “an” and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, do not precludethe presence or addition of one or more other components.

Hereinafter, exemplary embodiments will be described in greater detailwith reference to the accompanying drawings. The matters defined in thedescription, such as detailed construction and elements, are provided toassist in a comprehensive understanding of the exemplary embodiments.However, it is apparent that the exemplary embodiments can be carriedout by those of ordinary skill in the art without those specificallydefined matters. In the description of the exemplary embodiment, certaindetailed explanations of related art are omitted when it is deemed thatthey may unnecessarily obscure the essence of the inventive concept.

FIG. 1 is a view illustrating a transmitting and receiving system forparallel transmission of data according to an exemplary embodiment.

Referring to FIG. 1, a transmitting and receiving system for theparallel transmission of data includes a data transmitting apparatus 10and a data receiving apparatus 20. The data transmitting apparatus 10may, for example, be a first data transmitting apparatus 100 accordingto an exemplary embodiment, or a second data transmitting apparatus 300,according to another exemplary embodiment, the particularities of bothof which will be described later. The data receiving apparatus 20,likewise, may be, for example, a first data receiving apparatus 200according to an exemplary embodiment, or a second data receivingapparatus 400, according to another exemplary embodiment, also to bedescribed later.

A plurality of streams S1, S2, . . . , SN (herein, N is an integer) forthe parallel transmission of data are provided between the datatransmitting apparatus 10 and the data receiving apparatus 20. Theplurality of streams S1, S2, . . . , SN may be provided via at least oneport but may be realized by multiple channels having differentbandwidths. For example, the data transmitting apparatus 10 and the datareceiving apparatus 20 may exchange a file with each other in a parallelstreaming transmission method through a transmission control protocol(TCP) channel. However, this should not be considered as limiting.

According to an exemplary embodiment, the number of streams S1, S2, . .. , SN connected to transmit data may be increased or reduced,substantially in real time, according to the congestion rate of thenetwork in which the data is transmitted. That is, the number of streamsS1, S2, . . . , Sn connected between the data transmitting apparatus 10and the data receiving apparatus 20 to transmit data may beexponentially increased or linearly reduced based on the networkcongestion rate.

FIG. 2 is a block diagram illustrating a first data transmittingapparatus and a first data receiving apparatus for parallel transmissionof data according to an exemplary embodiment.

Referring to FIG. 2, the first data transmitting apparatus 100 includesa first socket management unit 110, a first control informationmanagement unit 120, a first communication unit 130, and a first diskcontrol unit 140.

If a request for transmission of target data is received, the firstsocket management unit 110 generates a socket to transmit basic controlinformation, including attribute information of the target data, to thefirst data receiving apparatus 200. The ‘socket’ mentioned herein is asoftware-implemented apparatus that connects the first data transmittingapparatus 100 and the first data receiving apparatus 200 to each otherso as to transmit target data, and one socket corresponds to one stream.If a plurality of streams is generated, multiple sockets, and multiplechannels are formed so that the target data can be transmitted inparallel.

The first socket management unit 110 initially sets, as the number ofconnections of streams to be used, the maximum number of connectionsthat can use the available bandwidth between the first communicationunit 130 and a second communication unit 210. Here, the term ‘initially’is used to describe the time at which the target data is initiallytransmitted to the first data receiving apparatus 200.

When the sockets are generated by the first socket management unit 110,the first control information management unit 120 generates thecorresponding basic control information. The basic control informationis information that is initially shared by the first data transmittingapparatus 100 and the first data receiving apparatus 200 when it isnecessary to transmit target data.

The basic control information may, in an exemplary embodiment, include afile name, a file size, the number of streams, the disk buffer size, thetotal number of blocks, the socket buffer size, an internet protocol(IP) address, port information, and a session identification (ID)related to the target data to be transmitted. The number of streams, atthis time, is the maximum number of connections which was initially setby the first socket management unit 110. The disk buffer size is thesize of a block that is assigned to a buffer to write data on a disk.The socket buffer size is the size of the buffer that is used at akernel end of a transmission protocol. The IP address is the address ofthe IP that is used to transmit data. The port information isinformation about the at least one port that is used to transmit data.The session ID is an ID of each stream.

The first communication unit 130 generates a plurality of streams usingthe available sockets which are generated by the first socket managementunit 110 in a number equal to the maximum number of connections, andcommunicates with the first data receiving apparatus 200 using thegenerated streams and a pre-defined protocol. The first communicationunit 130 uses the streams of the sockets to transmit the basic controlinformation, that was generated by the first control informationmanagement unit 120, to the first data receiving apparatus 200. Thefirst communication unit 130 may transmit the basic control information,in one exemplary embodiment, in parallel using the plurality of streams.

After transmitting the basic control information, the firstcommunication unit 130 transmits the target data to the first datareceiving apparatus 200, in parallel, using the plurality of streams.

The first disk control unit 140 reads out the target data from a storagemedium such as a hard disk drive (HDD), and provides the target data tothe first communication unit 130. The first disk control unit 140 mayread out the target data by dividing the target data into portions thathave respective sizes corresponding to the disk buffer size of the HDD.The first communication unit 130 may transmit the target data to thefirst data receiving apparatus 200, in parallel, using the maximumnumber of streams initially set.

It may happen that the number of connections of streams is changed, aswill be discussed below. The first data receiving apparatus 200 may, insuch a situation, notify the first data transmitting apparatus 100 ofthe change. That is to say, the first data receiving apparatus 200 maysend a change notification message to the first data transmittingapparatus 100. If the first data transmitting apparatus 100 receivessuch a change notification while the first data transmitting apparatus100 is in the midst of transmitting the target data, the first socketmanagement unit 110 changes the number of streams from the number thatwere previously connected to the new number as noticed by the first datareceiving apparatus 200. For example, assume an example in which themaximum number of connections included in the basic control informationthat was sent by the first data transmitting apparatus 100 is 5. Then,the first data receiving apparatus 200 sends a change notificationmessage to the first data transmitting apparatus 100 that the number ofavailable streams is 3. In response, the first socket management unit110 adjusts the number of available streams to be 3. Accordingly, thefirst communication unit 130 thereafter transmits the target data inparallel using three streams.

The first data receiving apparatus 200 includes a second communicationunit 210, a second control information management unit 220, a secondsocket management unit 230, a second disk control unit 240, atransmission speed calculation unit 250, a memory 260, and a parallelconnection management unit 270.

The second communication unit 210 receives the basic control informationfrom the first data transmitting apparatus 100, and provides the basiccontrol information to the second control information management unit220.

The second control information management unit 220 parses the basiccontrol information provided from the second communication unit 210 andidentifies information included in the basic control information. Thesecond control information management unit 220 sets an environmentnecessary for receiving the target data, on the basis of the identifiedinformation. For example, the second control information management unit220 informs the second socket management unit 230 of the maximum numberof connections and the socket buffer size included in the basic controlinformation. Also, the second control information management unit 220informs the second disk control unit 240 of the file name, the filesize, the disk buffer size, and the total number of blocks. In addition,the second control information management unit 220 informs the secondcommunication unit 210 of the IP address, the port information, and thesession ID.

The second socket management unit 230 sets the number of streams to beconnected initially on the basis of the maximum number of connectionsand the socket buffer size provided from the second control informationmanagement unit 220. The second socket management unit 230 alsogenerates sockets in a number corresponding to the set number ofstreams. The second socket management unit 230 may generate a sockethaving a size corresponding to the socket buffer size. Accordingly, thesecond communication unit 210 generates streams corresponding to thenumber of generated sockets. The second communication unit 210 alsoreceives the target data from the first data transmitting apparatus 100,in parallel, using the plurality of streams and a pre-defined protocol.Also, the second communication unit 210 provides the received targetdata to the second disk control unit 240.

The second disk control unit 240 may store the received target data in astorage medium such as an HDD based on the file name, the file size, thedisk buffer size, and the total number of blocks in accordance with theinformation provided from the second control information management unit220. In particular, the second disk control unit 240 may temporarilystore the target data in a buffer and then store the target data on adisk in a manner that takes into account the disk buffer size and thetotal number of blocks.

The transmission speed calculation unit 250 may calculate a transmissionspeed of the target data in each stream, which is received in parallelusing the plurality of streams. The transmission speed is affected bythe network congestion rate, which is affected by factors such asnetwork traffic. That is, as the network congestion rate is higher, thetransmission speed of data is slower; as the network congestion rate islower, the transmission speed of data is faster. Therefore, thetransmission speed calculation unit 250 may calculate the networkcongestion rate, by way of an estimation, based on the calculatedtransmission speed. In view of the changing network congestion rate, thenumber of connections of streams may be adjusted.

To achieve this, the transmission speed calculation unit 250 maycalculate a transmission speed of the target data in each stream at apre-defined monitoring time or within a monitoring period. As shown inFIG. 3, t, t-1, and t-2 are monitoring times, and a time intervalbetween a monitoring time and its next monitoring time corresponds to amonitoring period. Since a monitoring time arrives when a monitoringperiod elapses, the monitoring period and the monitoring time may incertain circumstances be understood to have the same meaning Therefore,hereinafter, the terms, “monitoring period” and “monitoring time” willbe interchangeably used.

The memory 260 may be a volatile memory or a non-volatile memory, andmay store the transmission speed of the target data, in each stream, ascalculated by the transmission speed calculation unit 250, eachmonitoring time. Table 1 shows an example of the transmission speed ofthe target data in each stream stored in the memory 260 (streams S4 andS5 are omitted solely for the sake of brevity of illustration):

TABLE 1 Monitoring Times ID of Stream t-4 t-3 t-2 t-1 t S1 600 kbps 620kbps 590 kbps 610 kbps 620 kbps S2 610 kbps 500 kbps 580 kbps 610 kbps610 kbps S3 595 kbps 580 kbps 580 kbps 600 kbps 620 kbps . . . . . . . .. . . . . . . . . .

Referring to table 1, ‘bps’ is a unit of data transmission speed and isan abbreviation for ‘bits per second’. That is, ‘bps’ is the number ofbits transmitted per unit time. At the most recent monitoring time (t),the transmission speed of the target data received through the firststream S1 is 620 kbps, the transmission speed of the target datareceived through the second stream S2 is 610 kbps, and the transmissionspeed of the target data received through the third stream S3 is 620kbps.

The parallel connection management unit 270 calculates the networkcongestion rate by taking into account any change in the transmissionspeed of the target data received through each of the plurality ofstreams. The parallel connection management unit 270 may adjust thenumber of streams from what was previously set, based on the calculatednetwork congestion rate.

To achieve this, the parallel connection management unit 270 includes anetwork congestion rate calculation unit 271 and a connection numbercalculation unit 273.

The network congestion rate calculation unit 271 identifies thetransmission speed of the data received through each of the plurality ofstreams from the memory 260 at every monitoring time, and identifies thenumber of streams in which the transmission speed has been detected asbeing reduced in each unit window, based on the identified transmissionspeed. The network congestion rate calculation unit 271 may calculatethe network congestion rate using the number of streams in which thetransmission speed is reduced in every unit window.

Specifically, the network congestion rate calculation unit 271calculates a ratio of reduced streams (that is, a ratio of streams inwhich a transmission speed is reduced) to the total streams, or to thenon-reduced streams, in each unit window, and sets the calculated ratioof reduced streams as a sub-network congestion rate which is a networkcongestion rate of each unit window. The ratio of the reduced streams isexpressed by following equation 1:

$\begin{matrix}{{{Ratio}\mspace{14mu} {of}\mspace{14mu} {reduced}\mspace{14mu} {streams}} = {\frac{\begin{pmatrix}{{the}\mspace{14mu} {number}\mspace{14mu} {of}\mspace{14mu} {streams}\mspace{14mu} {in}\mspace{14mu} {which}} \\{{the}\mspace{14mu} {transmission}\mspace{14mu} {speed}\mspace{14mu} {is}\mspace{14mu} {reduced}}\end{pmatrix}}{\begin{pmatrix}{{the}\mspace{14mu} {total}\mspace{14mu} {number}\mspace{14mu} {of}\mspace{14mu} {streams}} \\{{used}\mspace{14mu} {in}\mspace{14mu} a\mspace{14mu} {unit}\mspace{14mu} {window}}\end{pmatrix}\mspace{14mu}} = {{sub}\text{-}{network}\mspace{14mu} {congestion}\mspace{14mu} {rate}}}} & \lbrack {{Equation}\mspace{14mu} 1} \rbrack\end{matrix}$

The ratio of the reduced streams in equation 1 is a ratio of reducedstreams in one unit window and indicates the number of streams in whichthe transmission speed of the target data is reduced out of the totalnumber of streams used in the unit window. The network congestion ratecalculation unit 271 calculates the ratio of the reduced streams, ineach unit window, using Equation 1, and sets the calculated ratio as asub-network congestion rate of each unit window. If the total number ofstreams used to transmit the target data in a unit window generated at acurrent monitoring time is 15, and the number of streams in which thetransmission speed is reduced is 5, the sub-network congestion rate ofthe unit window is

5/15 = 1/3.

The network congestion rate calculation unit 271 may use an average, ofthe sub-network congestion rates calculated in every unit window, as ameasure of the overall network congestion rate. The network congestionrate calculation unit 271 may calculate such an average (that is, thenetwork congestion rate) by dividing a sum of the sub-network congestionrates calculated in every unit window by the number of unit windows. Thenetwork congestion rate calculation unit 271 may calculate the networkcongestion rate using Equation 2 as shown below:

$\begin{matrix}{C_{t} = {\frac{1}{l}{\sum\limits_{j = 0}^{l - 1}( {\sum\limits_{i = j}^{j + k - 1}\frac{n_{t - 1}}{a_{t - 1}}} )}}} & \lbrack {{Equation}\mspace{14mu} 2} \rbrack\end{matrix}$

Referring to Equation 2, C_(t) is a network congestion rate at a currentmonitoring time, l is the number of unit windows used to calculate thenetwork congestion rate, and k is the number of monitoring times. a_(t)is the total number of streams used in each unit window to transmittarget data at the current monitoring time and n_(t) is the number ofstreams in which the transmission speed is reduced in the unit windowcorresponding to the current monitoring time. l is the number of unitwindows used to calculate the network congestion rate and thus is usedto calculate the average of the sub-network congestion rates.

$\sum\limits_{j = 0}^{l - 1}( {\sum\limits_{i = j}^{j + k - 1}\frac{n_{t - 1}}{a_{t - 1}}} )$

in equation 2 is a sum of the values of the unit windows, each of whichis obtained by dividing the number of streams in which the transmissionspeed is reduced by the number of streams used in the unit window. Inthe case of FIG. 4A, which will be described later,

${\frac{9}{15} + \frac{9}{15} + \frac{8}{15}} = {\frac{26}{15}.}$

If the total number of streams used in each unit window to transmit thetarget data is the same in every unit window, equation 2 may simplifiedto the equation shown in Equation 3:

$\begin{matrix}{C_{t} = {\frac{1}{l \times a}{\sum\limits_{j = 0}^{l - 1}( {\sum\limits_{i = j}^{j + k - 1}n_{t - 1}} )}}} & \lbrack {{Equation}\mspace{14mu} 3} \rbrack\end{matrix}$

$\sum\limits_{j = 0}^{l - 1}( {\sum\limits_{i = j}^{j + k - 1}n_{t - 1}} )$

in Equation 3 is a sum of the numbers of streams in which thetransmission speed is reduced in every unit window. In the case of FIG.4A, 9+9+8=26.

The operation of the network congestion rate calculation unit 271, asjust explained with reference to exemplary Equations 1 to 3, may beunderstood to correspond to a double moving average algorithm suggestedin the present exemplary embodiment. The double moving average algorithmwill be explained below with reference to FIGS. 4A and 4B.

The network congestion rate calculation unit 271 may change the numberof unit windows used to calculate the network congestion rate and themonitoring period according to whether a wired network or a wirelessnetwork is being used. The situation of the network includes a packetloss rate and a packet round trip time (RTT).

For example, if the network situation deteriorates as the packet lossrate increases or the RTT increases, the network congestion ratecalculation unit 271 may increase the monitoring period or may increasethe number of unit windows or the number of monitoring times included inthe unit window. If the network situation improves, the networkcongestion rate calculation unit 271 may reduce the monitoring periodused to calculate the network congestion rate or, in the alternative,may reduce the number of unit windows or the number of monitoring timesincluded in the unit window. If the network situation is continuouslychanging, the network congestion rate calculation unit 271 may shortenthe monitoring period, and, if the period during which the networksituation is changed is relatively prolonged, the network congestionrate calculation unit 271 may extend the monitoring period.

The ‘unit window’ described above relates to streams which are usedduring the plurality of monitoring times, and each unit window may bechanged, with reference to the monitoring time, by a moving averagealgorithm. The unit window will be explained in detail below withreference to FIG. 3 and the method of calculating the network congestionrate using a double moving average and Equation 2 will be explained indetail below with reference to FIGS. 4A and 4B.

In an alternative, the connection number calculation unit 273 mayexponentially increase or linearly reduce the number of connections ofthe previously-connected streams, based on the network congestion ratecalculated by the network congestion rate calculation unit 271. Toachieve this, the connection number calculation unit 273 compares thecalculated network congestion rate and at least one set threshold value,and may increase or reduce the number of connections of streamsaccording to a result of the comparison, or in response to thecomparison result.

Specifically, if the calculated network congestion rate is less than orequal to a first threshold value (TH1), the connection numbercalculation unit 273 may exponentially increase the number ofconnections of plural streams in comparison with the previously setnumber of connections.

If the calculated network congestion rate is greater than the firstthreshold value (TH1) but is less than or equal to a second thresholdvalue (TH2), the connection number calculation unit 273 may reduce thenumber of streams by 1 in comparison with the previous number ofconnections. Here, the choice of an increment of ‘1’ is just an exampleand may be set differently according to the engineering needs of asystem. Since the change in this situation is merely an increment, itwill be understood that this exemplary embodiment with an increment of,e.g., 1, represents an incremental change in the number of streams.

If the calculated network congestion rate is greater than the secondthreshold value (TH2), but is less than or equal to a third thresholdvalue (TH3), the connection number calculation unit 273 may reduce thenumber of connections of plural streams by m % (wherein (the number ofconnections of plural streams×m %) is greater than 1) in comparison withthe previous number of connections. ‘m’ is a constant that satisfies therequirement that (the number of connections of plural streams×m %)≧1. Inan exemplary embodiment, ‘m’ may be one of 10, 20, and 30.

If a result of (the number of connections of plural streams×m %) isexpressed by a decimal point, the connection number calculation unit 273may adjust the number of connections by rounding up or down the result.For example, if a result of (the number of connections of pluralstreams×m %) is 3.1 and the number of connection of plural streams is10, 10−3=7 and thus the connection number calculation unit 273 mayreduce the number of connections of streams from 10 to 7.

In an exemplary embodiment, the connection number calculation unit 273may use 0.2 as the first threshold value (TH1), 0.5 as the secondthreshold value (TH2), and 1 as the third threshold value (TH3).However, this should not be considered as limiting. The number ofthreshold values used in the connection number calculation unit 273 isnot limited to 3, and may be more or fewer than 3. Since the maximumvalue of the network congestion rate is 1, the maximum value of thethird threshold value (TH3) is also 1.

If the number of connected streams is to be adjusted, the parallelconnection management unit 270 indicates the adjusted number of streams,or an adjustment to the number of streams, to the second socketmanagement unit 230. The second socket management unit 230 provides anID of a stream that will be temporarily stopped to the secondcommunication unit 210, with reference to the adjusted number ofstreams. The second communication unit 210 transmits the provided ID, ofthe stream to be temporarily stopped, to the first communication unit130. After that, the first communication unit 130 and the secondcommunication unit 210 may exchange the target data with each other inparallel using the streams other than the temporarily stopped stream.

FIG. 3 is a view illustrating an example of the above-described unitwindow.

Referring to FIG. 3, ‘t’ is a current monitoring time, ‘t-1’ is aprevious monitoring time, and ‘t-2’ is a monitoring time before ‘t-1’.Another way to put this is to say that the three time values represent acurrent monitoring time, an immediately preceding time, and anotherimmediately preceding time. Accordingly, a time difference between T and‘t-1’ corresponds to a monitoring period. In the exemplary embodiment ofFIG. 3, a first unit window W1 includes just three monitoring times.Another way to think of W1 is to see that it has 15 streams that areused during the three monitoring times. S1 to S5 are the IDs of thestreams that are used to transmit data at every monitoring time. Herein,the number of streams that experienced the reduced speed may beunderstood to constitute a reduced speed stream count.

The symbol ‘•’ (a blackened circle or oval) indicates a stream in whicha transmission speed is increased, constant, or reduced by less than 10%in comparison with an immediately preceding monitoring time. The symbol‘X’ indicates a stream in which a transmission speed is reduced by 10%or more in comparison with an immediately preceding monitoring time. Itcan be seen that the transmission speed of the target data receivedthrough the first stream S1 is reduced at the current monitoring time(t) in comparison with the previous monitoring time (t-1). The figure‘10%’ and the number of monitoring times forming the unit window, thatis, 3, should not be considered as limiting.

The total number of streams used in the first unit window W1 is 15, andthe number of streams in which the transmission speed of the target datais reduced (that is, the number of symbols ‘X’) is 9. That is to say,the reduced speed stream count is 9. Accordingly, the ratio of reducedstreams of the first unit window W1, that is, the sub-network congestionrate, is calculated with reference to equation 1 as follows:

${{Ratio}\mspace{14mu} {of}\mspace{14mu} {reduced}\mspace{14mu} {streams}} = {\frac{\begin{matrix}{{the}\mspace{14mu} {number}\mspace{14mu} {of}\mspace{14mu} {streams}\mspace{14mu} {in}\mspace{14mu} {which}} \\{{the}\mspace{14mu} {transmission}\mspace{14mu} {speed}\mspace{14mu} {is}\mspace{14mu} {reduced}}\end{matrix}}{{{the}\mspace{14mu} {total}\mspace{14mu} {number}\mspace{14mu} {of}\mspace{14mu} {streams}\mspace{14mu} {used}\mspace{14mu} {in}\mspace{14mu} a\mspace{14mu} {unit}\mspace{14mu} {window}}\mspace{14mu}} = \frac{9}{15}}$

The ratio of reduced streams may be a ratio of the number of streams inwhich the transmission speed is reduced in the first unit window 1, tothe total number of streams in the unit window. Here, “the ratio” meansan average of the number of streams in which it is detected that thetransmission speed has decreased within a certain time period, i.e.,within a unit window.

FIG. 4A is a view to explain an example of a method of calculating anetwork congestion rate using a double moving average algorithmaccording to an exemplary embodiment, and FIG. 4B is a view illustratingthe first to the third unit windows of FIG. 4A, respectively.

Referring to FIGS. 4A and 4B, ‘W1’, ‘W2’, and ‘W3’ are first, second,and third unit windows, respectively, which are used to calculate anetwork congestion rate. The first unit window W1 is the same as theunit window described above with reference to FIG. 3. That is, the firstunit window W1 has just three monitoring times (t, t-1, t-2). The secondunit window W2 is an immediately preceding window of the first unitwindow W1 and has just three monitoring times (t-1, t-2, and t-3). Thethird unit window W3 is an immediately preceding window of the secondunit window W2 and has just three monitoring times (t-2, t-3, t-4). Inother words, W1 may be thought of as a current window of a predeterminednumber of time samples, and W2 and W3 may be thought of as a pluralityof sequentially immediately preceding windows of the current window.

The network congestion rate calculation unit 271 calculates asub-network congestion rate with respect to the congestion datareflected in each of the first to the third unit windows W1, W2, and W3.To achieve this, the network congestion rate calculation unit 271 uses adouble moving average algorithm. The moving average is an average thatis obtained while shifting a section, so that a change in a trend can beeasily observed. In the case of FIG. 4A, a moving average in the firstwindow W1 is a ratio. This ratio is of the number of streams in whichthe transmission speed has decreased in the first unit window W1 to thetotal number of streams in the unit window. This ratio has the samemeaning as the ratio of reduced streams or the sub-network congestionrate. The ‘double moving average’ connotes further calculating anaverage of the sub-network congestion rates calculated for the unitwindows.

Referring to FIG. 4B, a sub-network congestion rate for each of thefirst to the third unit windows W1, W2, and W3 is calculated.

In the case of the first unit window W1, the total number of streamsused to transmit target data (a_(t)) is 15 and the number of streams inwhich the transmission speed has decreased in the first unit window W1corresponding to a current monitoring time (t) (n_(t)) is 9.Accordingly, the sub-network congestion rate of the first unit window W1is

$\frac{9}{15}.$

In the case of the second unit window W2, the total number of streamsused to transmit target data (a_(t-1)) is 15, and the number of streamsin which the transmission speed has decreased in the second unit windowW2, corresponding to a previous monitoring time (t-1) (n_(t-1)), is 9.Accordingly, the sub-network congestion rate of the second unit windowW2 is

$\frac{9}{15}.$

The second unit window W2 is logically understood as a shift of thefirst unit window W1 to the previous monitoring time (t-1), which has aduration the same as the monitoring period, and the sub-networkcongestion rate of the second unit window W2 is calculated with such asingle period shift. Therefore, the sub-network congestion rate of thesecond unit window W2 is a moving average calculated with respect to thesecond unit window W2 and with reference to the first unit window W1.

In the case of the third unit window W3, the total number of streamsused to transmit target data (a_(t-2)) is 15 and the number of streamsin which the transmission speed has decreased in the third unit windowW3, corresponding to a previous monitoring time (t-2) (n_(t-2)), is 8.Accordingly, the sub-network congestion rate of the third unit widow W3is

$\frac{8}{15}.$

The network congestion rate calculation unit 271 adds the sub-networkcongestion rates of the first to the third unit windows W1, W2, and W3,and calculates the network congestion rate by dividing the sum of thesub-network congestion rates by the number of unit windows, that is, 3unit windows. This is simply illustrated in FIG. 4A.

Referring back to FIG. 4A, the number of monitoring times used withineach of the first to the third unit windows W1, W2, and W3 (k) is 3, thenumber of unit windows used to calculate the network congestion rate (1)is 3, n_(t) is 9, n_(t-1) is 9, and n_(t-2) is 8. Also, a_(t), a_(t-1),and a_(t-2) are all 15.

The network congestion rate calculation unit 271 applies the aboveconstants to Equation 1 and calculates the network congestion rate atthe current monitoring time (t) as follows:

$C_{t} = {{\frac{1}{l}{\sum\limits_{j = 0}^{l - 1}{\sum\limits_{i = j}^{j + k - 1}\frac{n_{t - 1}}{a_{t - 1}}}}} = {{\frac{1}{3}{\sum\limits_{j = 0}^{3 - 1}{\sum\limits_{i = j}^{j + 3 - 1}\frac{n_{t - 1}}{a_{t - 1}}}}} = {{\frac{1}{3} \times \frac{1}{15} \times ( {9 + 9 + 8} )} = 0.577}}}$

As calculated by the above equation, the network congestion rate at thecurrent monitoring time (t) is 0.577. If the second threshold value(TH2) is 0.5 and the third threshold value (TH3) is 1, then thecalculated value of 0.577 is between the second threshold value (TH2)and the third threshold value (TH3). Accordingly, the connection numbercalculation unit 273 calculates the number of streams suitable to anetwork situation using equation St=St−1×(1−m %). For example, if thenumber of streams previously used was 10, and if m of m % was previouslyset to 30 for this adjustment, then it follows thatSt=St−1×(1−0.3)=10×0.7=7 and thus the connection number calculation unit273 indicates to the second socket management unit 230 that thecalculated number of streams that should be employed is 7. Thus, thenumber of connections of streams will be changed from 10 to 7.

FIG. 5 is a block diagram illustrating a second data transmittingapparatus and a second data receiving apparatus for paralleltransmission of data according to another exemplary embodiment.

Referring to FIG. 5, the second data transmitting apparatus 300 includesa third socket management unit 310, a third control informationmanagement unit 320, a third disk control unit 330, and a first buffermanagement unit 340. The third socket management unit 310, the thirdcontrol information management unit 320, and the third disk control unit330 shown in FIG. 5 perform operations similar, respectively, to thosealready mentioned with respect to the first socket management unit 110,the first control information management unit 120, the firstcommunication unit 130, and the first disk control unit 140 describedabove with reference to FIG. 2, and thus detailed explanations thereofare omitted.

If a request for the transmission of target data is received, the thirdsocket management unit 310 generates a socket to transmit, to the seconddata receiving apparatus 400, basic control information includingattribute information pertaining to the target data. The ‘target data’is data that is to be transmitted to the second data receiving apparatus400 and may have a particular file format. Accordingly, “the targetdata” and “the file” may carry substantially the same connotation. Sincethe target data is explained in FIG. 2 by way of an example, the filewill be explained hereinafter by way of an example.

The third socket management unit 310 initially sets the maximum numberof connections, that can use an available bandwidth available betweenthe second data transmitting apparatus 300 and the second data receivingapparatus 400, as the number of connections of streams to be initiallyconnected, and generates sockets in accordance with the thus-set maximumnumber of connections. The third socket management unit 310 generates aplurality of streams, using the sockets generated, in a numbercorresponding to the maximum number of connections, and transmits a fileto the second data receiving apparatus 400, in parallel, using thegenerated streams and a pre-defined protocol.

If the number of connections of streams is adjusted by the second datareceiving apparatus 400 while the file is being transmitted, the thirdsocket management unit 310 adjusts the number of connections of streamsfrom the number previously used to the number given in the noticereceived from the second data receiving apparatus 400, and thereaftertransmits the file to the second data receiving apparatus 400, inparallel, using the adjusted number of streams.

When the plurality of streams are generated by the third socketmanagement unit 310, the third control information management unit 320generates basic control information. The basic control information isinformation that is initially shared by the second data transmittingapparatus 300 and the second data receiving apparatus 400, so as totransmit a file.

The third disk control unit 330 reads out the file from a storage mediumsuch as an HDD. This read operation is carried out so as to have adivided file format. The thus read-out data is stored a disk buffer (notshown) in units corresponding to the size of the of divided file units.These are then transmitted from the disk buffer (not shown) to the firstbuffer management unit 340. This is because the third disk control unit330 reads out the file by dividing the file into divided file units thateach have a size corresponding to the size of the disk buffer (that is,a size of a file block).

The first buffer management unit 340 temporarily stores the divided fileunits which were input from the disk buffer (not shown) in a buffer thatis under the control of the third disk control unit 330.

To achieve this, the first buffer management unit 340 may include abuffer which is divided into a first non-use buffer queue 341 and afirst buffer queue 343. The buffer of the first buffer management unit340 is so divided in order to reuse all areas of the first buffermanagement unit 340. This is to prevent an overhead of garbage fromcollecting. Such garbage may collect due to non-reuse of a buffer when,e.g., Java or another OS independent language is used to implement theexemplary embodiment.

The first non-use buffer queue 341 may include a plurality of fileblocks for temporarily storing the divided file units which are inputfrom the disk buffer (not shown). One file block stores one divided fileunit. The file block may re-divide the divided file unit by a sizeassigned to the file block, and store the file. In this case, onedivided file unit may be stored in the plurality of file blocks, in adispersed manner. The latter case will be explained below.

If the divided file unit is stored in the file block of the firstnon-use buffer queue 341, the first buffer management unit 340 may storethe file block in the first buffer queue 343.

The first buffer queue 343 temporarily stores the file block input fromthe first non-use buffer queue 341. The file block stored in the firstbuffer queue 343 is transmitted to the second data receiving apparatus400 through a network, and then the used file block is returned to thefirst non-use buffer queue 341 to be reused. The first non-use bufferqueue 341 and the first buffer queue 343 temporarily store at least onefile block based on a first-in-first-out (FIFO) method. Thus, thesequeues are FIFO queues.

FIG. 6 is a view illustrating a configuration of a file block accordingto an exemplary embodiment.

Referring to FIG. 6, the file block is divided into a header and apayload. The header may include tag information to indicate that thefile block is data, ID information to identify a particular file, dataaddress information to indicate from which position of the file thedivided file unit is read out by the third socket management unit 310,and data size information of the read-out file (that is, informationabout the size of the payload). The payload may record real data, whichis included in the divided file unit, in an amount corresponding to thesize of the payload.

The file block shown in FIG. 6 may be used in the second buffermanagement unit 430 of the second data receiving apparatus 400 in thesame way as in the second data transmitting apparatus 300. Accordingly,the second data receiving apparatus 400 determine the relative positionwithin the file to which the currently received divided file unitbelongs, based on the data address information of the file block.

Referring back to FIG. 5, the third socket management unit 310 checkswhether there is a file block in the first buffer queue 343, and, if so,it reads out the file block and stores it in a transmission socketbuffer (not shown). The third socket management unit 310 may transmitthe file block stored in the transmission socket buffer (not shown) tothe second data receiving apparatus 400 in parallel using the pluralityof streams. The third socket management unit 310 generates the pluralityof sockets for parallel transmission as described above, and matches onesocket to one stream so that the divided file unit can be transmitted inparallel using the parallel streams.

The third socket management unit 310 may transmit the plurality of fileblocks in parallel using the streams or may transmit one file blockusing the plurality of streams. Hereinafter, the former case will beexplained. However, in the latter case, the third socket management unit310 may divide one file block among as many of the of the streams asthere are, and transmit the file block using the plurality of streams.For example, the third socket management unit 310 may divide the fileblock into a header and a payload and divide the header according toinformation, and then may transmit the divided data using the pluralityof streams.

The second data receiving apparatus 400 includes a fourth socketmanagement unit 410, a fourth control information management unit 420, asecond buffer management unit 430, a fourth disk control unit 440, and aparallel stream management unit 450. The fourth socket management unit410, the fourth control information management unit 420, the fourth diskcontrol unit 440, and the parallel stream management unit 450 shown inFIG. 5 perform operations respectively similar to those of the secondcommunication unit 210, the second socket management unit 230, thesecond control information management unit 220, the second disk controlunit 240, the transmission speed calculation unit 250, and the parallelconnection management unit 270 described above with reference to FIG. 2,and thus detailed descriptions thereof are omitted.

The fourth socket management unit 410 receives the basic controlinformation from the second data transmitting apparatus 300, andprovides the basic control information to the fourth control informationmanagement unit 420.

The fourth control information management unit 420 parses the basiccontrol information, provided from the fourth socket management unit410, and identifies the specific information included in the basiccontrol information.

The fourth socket management unit 410 sets the number of streams to beconnected based on what is indicated in the basic control information.The basic control information may initially indicates a maximum numberof connections, as mentioned earlier. The fourth socket management unit410 generates a number of sockets corresponding to the indicated numberof connections. The fourth socket management unit 410 generates streamsin a number corresponding to the number of generated sockets, andconnects the streams to the third socket management unit 310. The fourthsocket management unit 410 receives the file blocks from the second datatransmitting apparatus 300, in parallel, using the plurality of streams,and provides the file blocks to the second buffer management unit 430.Each of the file blocks has the configuration as shown in FIG. 6, as waspreviously described.

The second buffer management unit 430 may include a buffer which isdivided into a second non-use buffer queue 431 and a second buffer queue433.

Whenever a file block received at the fourth socket management unit 410,an empty file block is read out from the second non-use buffer queue 431and is stored in the second buffer queue 433.

The second buffer queue 433 temporarily stores the file block input fromthe second non-use buffer queue 431. The second non-use buffer queue 431and the second buffer queue 433 temporarily store at least one fileblock based on a FIFO method. That is to say, these are FIFO queues.

The fourth disk control unit 440 may store the received file block in astorage medium such as an HDD. The storage operation may be carried outtaking into account the file name, the file size, the disk buffer size,and the total number of blocks, as indicated in the previously receivedand parsed basic control information. In particular, the fourth diskcontrol unit 440 reads out the file blocks from the second buffer queue433 and stores them in the storage medium with reference to the diskbuffer size and the total number of blocks.

The parallel stream management unit 450 calculates a network congestionrate in every monitoring period in which one or more file blocks arereceived. The parallel stream management unit 450 adjusts the number ofconnections, of streams, based on the network congestion rate that itcalculates.

To achieve this, the parallel stream management unit 450 may calculate afile block transmission speed for the file block, received in parallelusing the plurality of streams, in each of the streams at everymonitoring time, and may store the transmission speed in a memory (notshown). The parallel stream management unit 450 may calculate thenetwork congestion rate using the double moving average algorithm,previously described, above, with reference to FIGS. 4A and 4B. Briefly,the parallel stream management unit 450 identifies the transmissionspeed of the file blocks received through each of the plurality ofstreams during each monitoring period, and identifies the number ofstreams in which the transmission speed has decreased in every unitwindow. The parallel stream management unit 450 may calculate thenetwork congestion rate using the number of streams in which thetransmission speed has decreased. The parallel stream management unit450 compares the calculated network congestion rate and pre-setthreshold values, and may exponentially increase or linearly reduce thepreviously set number of connections.

The parallel stream management unit 450 provides information about theadjusted number of streams to the fourth socket management unit 410.

The fourth socket management unit 410 may change the number of streamsto be actually used in response to the indication of the number ofconnections provided from the parallel stream management unit 450. Forexample, if the number of streams is reduced from 5 to 3, the fourthsocket management unit 410 may determine three streams from among thefive streams and may receive file blocks using the determined streams.

FIG. 7 is a flowchart illustrating a method for controlling streams toreceive data, in parallel, according to an exemplary embodiment.

A data receiving apparatus to perform the stream controlling method ofFIG. 7 may, for example, be the first data receiving apparatus 200 ofFIG. 2, or the second data receiving apparatus 400 of FIG. 5.

The data receiving apparatus receives target data from a datatransmitting apparatus in parallel through sockets forming a pluralityof streams (S710). The data transmitting apparatus may, for example, bethe first data transmitting apparatus 100 of FIG. 2 or the second datatransmitting apparatus 300 of FIG. 5.

The data receiving apparatus stores the target data received, inparallel, in a storage medium (S720).

The data receiving apparatus calculates the transmission speed of thetarget data received through each of the streams in operation S710. Thedata receiving apparatus stores the transmission speed in a memory(S730). The data receiving apparatus may calculate the transmissionspeed in each of the streams during every monitoring period, that is, atevery monitoring time at which a network congestion rate is set to becalculated.

The data receiving apparatus compares the transmission speed in each ofthe streams, calculated at a current monitoring time in operation S730,and a transmission speed calculated at a previous monitoring time, andidentifies the number of streams in which the transmission speed hasdecreased (S740). At this time, the data receiving apparatus mayidentify the number of streams in which the transmission speed hasdecreased in each unit window.

The data receiving apparatus calculates a sub-network congestion rate,which is a network congestion rate in each unit window, using the numberof streams in which the transmission speed has decreased in each unitwidow (S750). The data receiving apparatus calculates a ratio of thereduced streams (indicating the number of streams in which thetransmission speed is reduced) to the total number of streams used ineach unit window, using Equation 1, and sets the calculated ratio ofreduced streams as the sub-network congestion rate of the unit window.The data receiving apparatus calculates the sub-network congestion ratefor each of the unit windows.

The data receiving apparatus obtains an average of the sub-networkcongestion rates of the unit windows calculated in operation S750, andsets the average as the network congestion rate at the currentmonitoring time (S760). The average of the sub-network congestion ratesmay be obtained by dividing the sum of the sub-network congestion ratesby the number of unit windows.

The data receiving apparatus compares the network congestion rate(calculated in operation S760) and at least one threshold value, andcalculates the number of streams suitable to the current networksituation (S770). The data receiving apparatus may, e.g., exponentiallyincrease or linearly reduce the number of streams to be used based onthe calculated network congestion rate. Operation S770 will be explainedin more detail below with reference to FIG. 8.

Returning to FIG. 7, the data receiving apparatus adjusts the number ofstreams, to be used to receive the target data in parallel, according tothe number of streams calculated in operation S770, and receives thetarget data from the data transmitting apparatus in parallel using theadjusted number of streams (S780). The data transmitting apparatus maybe notified, of the adjusted number of streams, by the data receivingapparatus and may thereafter adjust the number of streams on the basisof the notification.

FIG. 8 is a flowchart illustrating one implementation of operation S770of FIG. 7, to calculate the number of streams.

Referring to FIG. 8, the data receiving apparatus compares the networkcongestion rate (Ct) calculated in operation S760 and a first thresholdvalue (TH1) (S810). Here, ‘t’ of the network congestion rate (Ct)connotes a current monitoring time.

If the network congestion rate (Ct) is less than or equal to the firstthreshold value (TH1) (S810-Y), the data receiving apparatus mayexponentially increase the number of connected streams (S_(t-1)) (S820).In FIG. 8, ‘S_(t-1)’ indicates the number of streams used in receivingthe target data in operation S710, that is, the number of streamspreviously set, ‘S_(t)’ indicates the increased number of streams, and‘n’ is a natural number, for example, 1. However, ‘n’ is adaptivelychangeable according to a network situation.

If the network congestion rate (Ct) is greater than the first thresholdvalue (TH1) (S810-N), the data receiving apparatus compares the networkcongestion rate (Ct) and a second threshold value (TH2) (S830).

If the network congestion rate (Ct) is greater than the first thresholdvalue (TH1), but is less than or equal to the second threshold value(TH2) (5830-Y), the data receiving apparatus may reduce the number ofconnected streams (S_(t-1)) by 1 (S840).

On the other hand, if the network congestion rate (Ct) is greater thanthe second threshold value (TH2) but is less than or equal to a thirdthreshold value (TH3) (5850-Y), the data receiving apparatus may reducethe number of connected streams (S_(t-1)) by m %. ‘m’ is a constant thatsatisfies (the number of a plurality of streams×m %)≧1. For example, ifm=30 and the number of streams (S_(t-1)) is 10, 10×30%=3. Thus, the datareceiving apparatus in such a scenario would reduce 10 streams by 3 soas to use only 7 streams.

FIG. 9 is a flowchart illustrating a method for controlling streams toreceive data in parallel, according to another exemplary embodiment.

A data transmitting apparatus and a data receiving apparatus to performthe stream controlling method of FIG. 9 may, e.g., be the first datatransmitting apparatus 100 and the first data receiving apparatus 200 ofFIG. 2 or the second data transmitting apparatus 300 and the secondreceiving apparatus 400 of FIG. 5.

If a request for transmission of a file is received, the datatransmitting apparatus determines the number of streams so as to be ableto use all the available bandwidth, and generates sockets in a numbercorresponding to the number of streams (S905).

The data transmitting apparatus transmits the previously mentioned basiccontrol information, including attribute information about the file, tothe data receiving apparatus, using at least one socket (S910).

The data receiving apparatus sets an environment for reception of thefile, based on the basic control information received in operation S910(S915). For example, the data receiving apparatus may set the number ofstreams to be connected, and generate sockets corresponding to the setnumber of streams (the number of streams having been based on themaximum number of connections and a socket buffer size of the basiccontrol information).

The data transmitting apparatus reads out the file from a storagemedium, such as an HDD, in a divided file format, and stores the dividedfile units in a buffer queue, in units of file blocks (S920). The bufferqueue may be constituted as the first non-use buffer queue 341 and thefirst buffer queue 343 of FIG. 5.

The data transmitting apparatus reads out at least one file block(stored in the buffer queue in operation S920) and stores the file blockin a transmission socket buffer (S925).

The data transmitting apparatus transmits the at least one file block,stored in the transmission socket buffer, to the data receivingapparatus, in parallel, using the plurality of streams generated inoperation S905 (S930).

The data receiving apparatus stores the file block, received in parallelin operation S930, in a reception socket buffer (S935).

The data receiving apparatus temporarily stores the at least one fileblock stored in the reception socket buffer in a buffer queue (S940).The buffer queue may, e.g., be constituted as the second non-use bufferqueue 431 and the second buffer queue 433 of FIG. 5.

The data receiving apparatus stores the at least one file block, storedin the buffer queue, in a storage medium such as an HDD (S945).

While receiving the file blocks from the data transmitting apparatus, inparallel, and storing the file blocks in the storage medium, that is,during operations S935 to 945, the data receiving apparatus identifies amonitoring period or a monitoring time (S950).

When the duration of the monitoring period expires (S950-Y), the datareceiving apparatus calculates the network congestion rate using, e.g.,a double moving average algorithm (S955). The data receiving apparatusmay, for example, calculate the network congestion rate using the methoddescribed in operations S730 to S760 of FIG. 7 or the method describedwith reference to FIGS. 4A and 4B.

The data receiving apparatus compares the network congestion rate,calculated in operation S955, and at least one threshold value, andcalculates the number of streams (St) suitable to the current networksituation (S960). The data receiving apparatus may calculate the numberof streams (St) using the method described with reference to FIG. 8.

The data receiving apparatus adjusts the number of streams to beactually used, using the number of streams (St) calculated in operationS960 (S965).

The data receiving apparatus notifies the adjusted number of streams(St) to the data transmitting apparatus (S970).

The data transmitting apparatus adjusts the number of streams to be usedto transmit the target data, in parallel, based on the notified numberof streams (St) (S975).

The data transmitting apparatus thereafter transmits the file inparallel using the number of streams as adjusted in number in operationS975 (S980).

One or more of the exemplary embodiments thus prevent or ameliorate adeterioration in a transmission speed which may be caused by theineffective use of the available network bandwidth when a file istransmitted in a related-art method such as a file transfer protocol(FTP) method in a wide area network (WAN), and makes more efficient useof the bandwidth by transmitting a file in a multiplexing manner throughmultiple channels using parallel TCP, which is a software algorithm,and, as a result, improves the file transmission speed.

Also, one or more of the exemplary embodiments suggest an algorithm tocontrol the number of stream connections, based on a double movingaverage, in order to dynamically control the transmission speed inresponse to network congestion, when transmitting a file at a high speedthrough parallel TCP, and solves a bandwidth occupation problem of arelated-art software-based high speed transmission method.

The above-described exemplary embodiments may be applicable to any andall fields for transmitting data at a high speed. For example, theexemplary embodiments may be applicable to web sites, or to programsthat exchange a media file (a moving picture, a photo, music) with oneanother, or apparatuses that exchange a high capacity 3D movie file withone another at a remote distance. The exemplary embodiments may beutilized in back up or file transmission between data centers locatedaway from each other. In addition, there is no particular requirementthat the file content be fixed beforehand, and so the inventive conceptmay be applicable in the case of a real-time streaming broadcast of livedata, or the like.

While exemplary embodiments have been particularly shown and describedabove, it will be understood by those of ordinary skill in the art thatvarious changes in form and details may be made therein withoutdeparting from the spirit and scope of the inventive concept as definedby the following claims.

1. A method for controlling streams to receive data in parallel, themethod comprising: receiving data, in parallel, over a plurality ofconnected streams; calculating a network congestion rate using a changein a transmission speed of data received through the plurality ofstreams; adjusting a number of connections of the plurality of streams,based on the calculated network congestion rate; and receiving the datain parallel over an adjusted number of the plurality of connectedstreams.
 2. The method as claimed in claim 1, wherein the calculating ofthe network congestion rate comprises: identifying the transmissionspeed of the data received over each of the plurality of streams duringone or more monitoring periods defining one or more unit windows;performing an identification, in each of the one or more unit windows,to identify ones of the plurality of streams in which the transmissionspeed of the data has decreased, to obtain a decreased speed streamcount; and calculating the network congestion rate based on the reducedspeed stream count.
 3. The method as claimed in claim 2, wherein thecalculating of the congestion rate based on the reduced speed streamcount, comprises: for each of the one or more unit windows, calculatinga ratio of the reduced speed stream count to the total number of streamsused, as a sub-network congestion rate; and averaging the calculatedsub-network congestion rate for each of a plurality of the one or moreunit windows to obtain the network congestion rate.
 4. The method asclaimed in claim 2, wherein the calculating of the network congestionrate further comprises: calculating the transmission speed of the datareceived through the plurality of streams, at each of the one or moremonitoring periods, and storing the transmission speed.
 5. The method asclaimed in claim 1, wherein the calculating of the network congestionrate comprises: calculating a respective sub-network congestion ratebased on a change in the transmission speed of the data in each of oneor more unit windows, each of the one or more unit windows including oneor more monitoring periods during which the transmission speed of thedata received through each of the plurality of streams is identified;and calculating an average of each of the respective sub-networkcongestion rates and using the average as the network congestion rate.6. The method as claimed in claim 1, wherein the adjusting of the numberof connections of the plurality of streams comprises is based on thecalculated network congestion rate, and includes at least one of:exponentially increasing the number of connections; and linearlyreducing the number of connections.
 7. The method as claimed in claim 1,wherein the adjusting of the number of connections of the plurality ofstreams comprises: making a comparison of the calculated networkcongestion rate and at least one threshold value; and adjusting thenumber of connections according to a result of the comparison.
 8. Themethod as claimed in claim 7, wherein, when calculated networkcongestion rate is less than or equal to a first threshold value, thenumber of connections is adjusted by exponentially increasing the numberof connections.
 9. The method as claimed in claim 8, wherein: when thecalculated network congestion rate is greater than the first thresholdvalue but is less than or equal to a second threshold value, reducingthe number of connections of the plurality of streams by 1, and when thecalculated network congestion rate is greater than the second thresholdvalue but is less than or equal to a third threshold value, reducing thenumber of connections of the plurality of streams by m % in comparisonwith a current number of connections, wherein the number of connectionsof the plurality of streams multiplied by the m % is greater than
 1. 10.The method as claimed in claim 1, wherein an initial number of theconnections of streams allowed to receive the data in parallel is set toa maximum number of connections that can be used in a presentlyavailable bandwidth.
 11. An apparatus for parallel reception of data,the apparatus comprising: a parallel connection management unit whichcalculates a network congestion rate using a change in a transmissionspeed of data received in parallel through each of a plurality ofstreams, and adjusts a number of connections of the plurality of streamsbased on the calculated network congestion rate; and a communicationunit which receives the data in parallel using the streams, the numberof which is adjusted by the parallel connection management unit.
 12. Theapparatus as claimed in claim 11, wherein: the parallel connectionmanagement unit includes a network congestion rate calculation unitwhich identifies the transmission speed of the data received througheach of the plurality of streams during each of a plurality ofmonitoring periods, and the network congestion rate calculation unitcalculates the network congestion rate based on a decreased speed streamcount within one or more unit windows, taken over the plurality ofmonitoring periods.
 13. The apparatus as claimed in claim 12, whereinthe network congestion rate calculation unit: calculates a ratio of thedecreased speed stream count to a total number of streams used in eachunit window, in every one of the one or more unit windows; uses theratio as a sub-network congestion rate each unit window; and determinesthe network congestion rate by dividing a sum of the sub-networkcongestion rates by a number of the one or more unit windows.
 14. Theapparatus as claimed in claim 12, further comprising: a transmissionspeed calculation unit which calculates the transmission speed of thedata received through the plurality of streams, during each of the oneor more monitoring periods; and a memory which stores the transmissioneach calculated transmission speed.
 15. The apparatus as claimed inclaim 11, wherein the network congestion rate calculation unit:calculates a respective sub-network congestion rate based on a change inthe transmission speed of the data in each of one or more unit windows,each of the one or more unit windows including one or more monitoringperiods during which the transmission speed of the data received througheach of the plurality of streams is identified; and calculates anaverage of each of the respective sub-network congestion rates and usesthe average as the network congestion rate.
 16. The apparatus as claimedin claim 11, wherein the parallel connection management unit comprises aconnection number calculation unit which adjusts the number of streamsbased on the calculated network congestion rate by performing at leastone of: exponentially increasing the number of connections, and linearlyreducing the number of connections.
 17. The apparatus as claimed inclaim 11, wherein the parallel connection management unit comprises aconnection number calculation unit which: makes a comparison of thecalculated network congestion rate and at least one threshold value; andadjusts the number of connections according to a result of thecomparison.
 18. The apparatus as claimed in claim 17, wherein, when thecalculated network congestion rate is less than or equal to a firstthreshold value, the connection number calculation unit adjusts thenumber of connections by exponentially increasing the number ofconnections.
 19. The apparatus as claimed in claim 18, wherein: when thecalculated network congestion rate is greater than the first thresholdvalue but is less than or equal to a second threshold value, theconnection number calculation unit reduces the number of connections ofthe plurality of streams by 1; and when the calculated networkcongestion rate is greater than the second threshold value but is lessthan or equal to a third threshold value, the connection numbercalculation unit reduces the number of connections of the plurality ofstreams by m % in comparison with a current number of connections,wherein the number of connections of the plurality of streams multipliedby the m % is greater than
 1. 20. The apparatus as claimed in claim 11,further comprising a socket management unit which sets an initial numberof the connections of the streams allowed to receive the data inparallel to a maximum number of connections that can be used in apresently available bandwidth available in the communication unit. 21.An apparatus that receives data, comprising: a communication unit,connection management unit, and a memory; wherein: the communicationunit receives data, in parallel streams, at a present number of aplurality of connections, and stores the received data at leasttemporarily in the memory; the connection management unit dynamicallycalculates a network congestion rate based on a present number of theplurality of connections; the connection management unit uses thecalculated network congestion rate to make a determination as to whetherto adjust the present number of the plurality of connections; and whenthe determination to adjust is an affirmative determination, thecommunication unit issues a change notification indicating a new numberof the plurality of connections to be used thereafter.
 22. The apparatusas set forth in claim 21, wherein the connection management unitcalculates the network congestion rate based upon a local calculationmade with respect to at least a current window of a predetermined numberof time samples.
 23. The apparatus as set forth in claim 22, wherein thelocal calculation is based on a reduced speed stream count pertaining tothe present number of the plurality of connections, taken at each of thepredetermined number of time samples of the current window.
 24. Theapparatus as set forth in claim 22, wherein the local calculation ismade with respect also to a plurality of sequentially immediatelypreceding windows of the current window.
 25. The apparatus as set forthin claim 24, wherein the local calculation is based on a reduced speedstream count pertaining to the present number of the plurality ofconnections, taken at each of the predetermined number of time samplesof the current window and also of the plurality of sequentiallyimmediately preceding windows.
 26. The apparatus as set forth in claim21, wherein, when the determination of the connection management unit toadjust the present number of the plurality of connections, the newnumber of the plurality of connections to be used is based on acomparison of the network congestion rate with one or more thresholds.27. The apparatus as set forth in claim 26, wherein the new number ofthe plurality of connections to be used has a relation to the presentnumber of the plurality of connections, such that at least one of thefollowing is true: the new number represents an exponential increaseover the present number; the new number represents a linear decreasefrom the present number; and the new number represents an incrementalchange from the present number.
 28. The apparatus as set forth in claim21, further comprising a storage to which the received data is written.